<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>定位属性</title>
    <style type="text/css">
        /*
            position
            01.relative: 相对定位，相对于自身原来的位置
            02.absolute: 绝对定位，相当于父级
            03.fixed: 固定定位，相当于浏览器
            04.static: 默认值
        */
        img{
            position: fixed; /*固定定位*/
            left: 50px;
            top: 20px;
        }
        #a{
            position: absolute; /*绝对定位*/
            top: 20px;
            height: 50px;
            width: 50px;
            background-color: blue;
        }
        #b{
            height: 50px;
            width: 50px;
            background-color: deeppink;
        }
        #c{
            position: relative; /*相对定位*/
            height: 50px;
            width: 50px;
            background-color: green;
        }
    </style>
</head>
<body>
    <div id="a"></div>
    <div id="b"></div>
    <div id="c"></div>
    <img src="images/cat.jpg" width="50px" height="50px">
</body>
</html>